import request from "@/utils/request";

// 用户列表
export function getUserList(params: any) {
  return request.get(
    { url: "/user.user/lists", params },
    { ignoreCancelToken: true }
  );
}

// 用户列表
export function getUserGroupAll(params?: any) {
  return request.get({ url: "/user.userGroup/all", params });
}

// 用户详情
export function getUserDetail(params: any) {
  return request.get({ url: "/user.user/detail", params });
}

// 用户编辑
export function userEdit(params: any) {
  return request.post({ url: "/user.user/edit", params });
}

// 用户编辑
export function adjustMoney(params: any) {
  return request.post({ url: "/user.user/adjustAccount", params });
}

// 用户编辑会员时间
export function adjustMember(params: any) {
  return request.post({ url: "/user.user/adjustMember", params });
}

//会员列表
export function getMemberList(params?: any) {
  return request.get({ url: "/member.member_package/commonLists", params });
}

// 调整用户视频合成时长
export function adjustVideo(params: any) {
  return request.post({ url: "/user.user/adjustAccount", params });
}

//创建用户
export function addUser(params: any) {
  return request.post({ url: "/user.user/add", params });
}

//黑名单
export function blackList(params: any) {
  return request.post({ url: "/user.user/blacklist", params });
}

//重置密码
export function resetPassword(params: any) {
  return request.post({ url: "/user.user/rePassword", params });
}

//会员开通记录
export function getOpenVipRecord(params: { user_id: number }) {
  return request.get({ url: "/user.user/buyLog", params });
}

// 注销账号
export function userCancelled(params: { user_id: number }) {
  return request.post({ url: "/user.user/cancelled", params });
}

export function setRegisterReward(params: any) {
  return request.post({ url: "/market.regReward/save", params });
}

export function getRegisterReward() {
  return request.get({ url: "/market.regReward/detail" });
}

//用户分组列表
export function userGroupingList(params: any) {
  return request.get({ url: "/user.userGroup/lists", params });
}

//用户分组新增
export function userGroupingAdd(params: any) {
  return request.post({ url: "/user.userGroup/add", params });
}
//用户分组编辑
export function userGroupingEdit(params: any) {
  return request.post({ url: "/user.userGroup/edit", params });
}
//用户分组删除
export function userGroupingDel(params: any) {
  return request.post({ url: "/user.userGroup/del", params });
}

//设置分组
export function userGroupingset(params: any) {
  return request.post({ url: "/user.user/setGroup", params });
}

//调整智能体
export function adjustRobot(params: any) {
  return request.post({ url: "/user.user/adjustRobot", params });
}

//调整智能体
export function adjustKb(params: any) {
  return request.post({ url: "/user.user/adjustKb", params });
}

// 调整分销
export function adjustLeader(params?: any) {
  return request.post({ url: "/user.user/adjustLeader", params });
}

// 教师管理列表
export function getTeacherList(params: any) {
  console.log("getTeacherListgetTeacherList");

  return request.post({ url: "/admin/teacher/teacherList", params });
}

// 创建老师
export function addTeacher(params: any) {
  return request.post({ url: "/admin/teacher/addTeacher", params });
}

// 编辑老师
export function editTeacher(params: any) {
  return request.post({ url: "/admin/teacher/editTeacher", params });
}

// 删除老师
export function delTeacher(params: any) {
  return request.post({ url: "/admin/teacher/delTeacher", params });
}

// 老师详情
export function getTeacherDetail(params: any) {
  return request.post({ url: "/admin/teacher/showTeacher", params });
}
// 上传图片
export function uploadImage(params: any) {
  return request.uploadFile({ url: "/admin/common/uploadFile" }, params);
}

// 学生列表
export function getStudentList(params: any) {
  return request.post({ url: "/admin/student/studentList", params });
}

// 学院列表
export function getDepartmentList(params: any) {
  return request.post({ url: "/admin/college/collegeList", params });
}

// 添加学院
export function addDepartment(params: any) {
  return request.post({ url: "/admin/college/addCollege", params });
}

// 删除学院
export function delDepartment(params: any) {
  return request.post({ url: "/admin/college/delCollege", params });
}

// 编辑学院
export function editDepartment(params: any) {
  return request.post({ url: "/admin/college/editCollege", params });
}

// 班级列表
export function getClassList(params: any) {
  return request.post({ url: "/admin/classes/classesList", params });
}

// 删除班级
export function delClass(params: any) {
  return request.post({ url: "/admin/classes/delClasses", params });
}

// 新增班级i
export function addClass(params: any) {
  return request.post({ url: "/admin/classes/addClasses", params });
}

// 编辑班级
export function editClass(params: any) {
  return request.post({ url: "/admin/classes/editClasses", params });
}

// 新增学生
export function addStudent(params: any) {
  return request.post({ url: "/admin/student/addStudent", params });
}

// 更新学生
export function editStudent(params: any) {
  return request.post({ url: "/admin/student/editStudent", params });
}

export function delStudent(params: any) {
  return request.post({ url: "/admin/student/delStudent", params });
}

// 学生详情
export function getStudentDetail(params: any) {
  return request.post({ url: "/admin/student/showStudent", params });
}

// 对话历史
export function getHistoryList(params: any) {
  return request.post({ url: "/admin/Works/dialogueList", params });
}

// 获取角色模型列表
export function getRoleModelList(params: any) {
  return request.post({ url: "/admin/Works/skillList", params });
}

// 对话模型列表
export function getDialogueModelList(params: any) {
  return request.post({ url: "/admin/Works/modelsList", params });
}

// 创作记录
export function getCreatRecord(params: any) {
  return request.post({ url: "/admin/Works/creationList", params });
}

/* 绘画作品记录 */
export function getPaintRecord(params: any) {
  return request.post({ url: "/admin/Works/drawList", params });
}

// 作品详情
export function getWorksDetail(params: any) {
  return request.post({ url: "/admin/Works/drawDetail", params });
}
